package com.game.gameshoppingcenter.dao;


import com.game.gameshoppingcenter.entities.Users;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UsersRepository extends CrudRepository<Users,Long> {
   List<Users> findAll();
   @Query(nativeQuery = true,value = "select *from users where name =?1 and password=?2")
   List<Users> findByNameAndPassword(String username,String password);

}
